package com.chinasoft.carservice.service;


import com.chinasoft.ms.dto.CarDTO;
import com.chinasoft.ms.pojo.Car;
import com.chinasoft.ms.pojo.User;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public interface CarService {
     boolean updateStatus(Long carId, String s);

    CarDTO selectCarById(Long id);

    List<CarDTO> searchCarDTOs(CarDTO queryDto);

    CarDTO addCar(CarDTO carDTO);

    CarDTO updateCar(CarDTO carDTO);

    void deleteCar(Long id);

    /**
     * 用户租借车辆
     */
    boolean rentCar(Long carId, Long userId, Date rentalStart, Date rentalEnd);

    boolean returnCar(Long rentalId);
}
